package com.zxq.ai;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

@Component
public class ConfigPrinter implements CommandLineRunner {

    @Autowired
    private Environment env;

    @Override
    public void run(String... args) throws Exception {
        System.out.println("Redis_Host: " + env.getProperty("spring.redis.host"));
        System.out.println("Redis_Port: " + env.getProperty("spring.redis.port"));
        System.out.println("Redis_Password: " + env.getProperty("spring.redis.password"));
    }
}
